<template>
  <el-button @click="click">
    <i v-if="props.icon" :class="[props.icon, props.label ? 'right-icon' : '']" />
    {{props.label}}
  </el-button>
</template>

<script setup>
const emit = defineEmits(['click']);
const props = defineProps({
  label: {
    type: String,
    default: '提交'
  },
  icon: {
    type: String,
    default: ''
  },
});

const click = (event) => {
  emit('click', event);
};
</script>